package com.steel.yfmall.cloud.assistant.common.impl;

import com.alibaba.fastjson.JSONObject;
import com.steel.yfmall.cloud.assistant.common.CommonPublicInfoService;
import com.steel.yfmall.cloud.common.api.PlatformCommonPublicInfoService;
import com.steel.yfmall.cloud.common.bean.param.APIParamMallConfigBean;
import com.steel.yfmall.cloud.common.bean.result.APIResultMallConfigBean;
import com.steel.yfmall.cloud.components.utils.base.APIMsgBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author jia chang bao
 * @Title: CommonPublicInfoServiceImpl
 * @Package com.steel.yfmall.cloud.user.service.impl
 * @Description: (用一句话描述该文件做什么)
 */
@Service
@Slf4j
public class CommonPublicInfoServiceImpl implements CommonPublicInfoService {

    @Resource
    private PlatformCommonPublicInfoService platformCommonPublicInfoService;

    /**
     * 根据参数查询基础常量配置
     * @Title: gyfmallConfigInfoByPara
     * @Description: (这里用一句话描述这个方法的作用)
     * @Param apiParaBean 参数说明
     * @author jia chang bao
     */
    @Override
    public APIMsgBean<APIResultMallConfigBean> gyfmallConfigInfoByPara(APIParamMallConfigBean apiParaBean){
        APIMsgBean<APIResultMallConfigBean> apiResultInfo= null;
        try {
            apiResultInfo =  platformCommonPublicInfoService.gyfmallConfigInfoByPara(apiParaBean);
        }catch (Exception e){
            log.error("根据参数查询基础常量配置错误: " + JSONObject.toJSONString(apiParaBean));
            log.error("function gyfmallConfigInfoByPara: " , e);
        }
        return apiResultInfo;
    }

}
